# 面向对象 封装
import redis

class MyRedis:

	def __init__(self,key,**redis_kwargs):

		self.__db = redis.Redis(**redis_kwargs)

		self.key = key


	def set(self,value):

		self.__db.set(self.key,value)


	def get(self):

		return self.__db.get(self.key)

r = MyRedis('999')

r.set('888')

print(r.get())

